<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>考试</title>
<style>
#chart-container {
	position: relative;
	width: 600px; height : 900px;
	overflow: hidden;
}
</style>
<!--外部引入-->
    <link rel="stylesheet" th:href="@{/libs/bootstrap/bootstrap4dist/css/bootstrap.css}">
	<link rel="stylesheet" th:href="@{/css/student/mainpage.css}">
	<link rel="stylesheet" th:href="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_bootstrap-table.min.css}">
</head>
<body>
<div>
	<h1>考试</h1>
	<!-- 新增按钮 -->
				<button type="button" class="btn btn-primary" data-toggle="modal"
				data-target="#addmodal" data-whatever="@mdo">新增</button>
	<div>
		<table id="tab" data-pagination="true" data-page-size="4" data-search="true"><!--是分页data-pagination="true" data-page-size="4" data-search="true"-->
		</table>
	</div>
	
	<div id="chart-container"></div>
	<!-- 饼状图 -->
	<div>
		<input id="addr" hidden th:value="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()} " />
		<!-- 获取到controller路径 -->
	</div>
	<div>
			<!-- 新增 -->
			<div class="modal fade" id="addmodal" tabindex="-1"
				aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLabel">新增水果信息</h5>
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body">
							<form>
								<div class="form-group">
									<label for="studentName" class="col-form-label">商品名称</label> 
									<input type="text" class="form-control" id="addname">
								</div>
								<div class="form-group">
									<label for="mobile" class="col-form-label">商品数量</label> 
									<input type="text" class="form-control" id="addnum">
								</div>
								
								<label for="provinces">类型</label> <select style="width: 250px; height:30px;" id="leixing">
											<option value="">商品类型</option>
											<option value="水果">水果</option>
											<option value="蔬菜">蔬菜</option>
											<option value="副食品">副食品</option>
											<option value="日用品">日用品</option>
										</select>
										
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-secondary"
								data-dismiss="modal">取消</button>
							<button type="button" onclick="save()" class="btn btn-primary">确认</button>
						</div>
					</div>
				</div>
			</div>
	</div>
	
		<div>
			<!-- 修改 -->
			<div class="modal fade" id="updatemodal" tabindex="-1"
				aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLabel">修改水果信息</h5>
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body">
							<form>
								<div class="form-group">
									<label for="studentName" class="col-form-label">商品名称</label> 
									<input type="text" class="form-control" id="updatename">
								</div>
								<div class="form-group">
									<label for="mobile" class="col-form-label">商品数量</label> 
									<input type="text" class="form-control" id="updatenum">
								</div>
								
								<label for="provinces">类型</label> <select style="width: 250px; height:30px;" id="updateleixing">
											<option value="">商品类型</option>
											<option value="水果">水果</option>
											<option value="蔬菜">蔬菜</option>
											<option value="副食品">副食品</option>
											<option value="日用品">日用品</option>
										</select>
										
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-secondary"
								data-dismiss="modal">取消</button>
								<input type="text" class="form-control" hidden="hidden" id="pkid">
							<button type="button" onclick="update()" class="btn btn-primary" data-dismiss="modal">确认</button>
						</div>
					</div>
				</div>
			</div>
	</div>
<!--外部引入-->
	<script th:src="@{/libs/jquery/jquery-3.5.1.js}"></script>
	<script th:src="@{/libs/bootstrap/bootstrap4dist/js/bootstrap.js}"></script>
	<script th:src="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_bootstrap-table.min.js}"></script>
	<script th:src="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_locale_bootstrap-table-zh-CN.min.js}"></script>
	<script th:src="@{/js/Ssbks2/echarts.min.js}"></script>
	<script th:src="@{/js/Ssbks2/Ssbkaoshi.js}"></script>
	
	
</body>
</html>